#include "reportdata.h"

#include "../../editors/items/editoritemcommon.h"

#include <QtGui/QStandardItemModel>

using namespace core;
using namespace swp;

ReportData::ReportData() : QObject(),
    m_executions(new QStandardItemModel(this)),
    m_steps(new QStandardItemModel(this)),
    m_tokens(new QStandardItemModel(this)),
    m_connectionData(ConnectionData(CONNECTION_NOT_VALID))
{

}

ReportData::~ReportData()
{

}

IDocumentData::Type ReportData::type() const
{
    return AbstractModel;
}

void ReportData::setConnectionData(const ConnectionData &data)
{
    // do nothing
}

const ConnectionData& ReportData::connectionData() const
{
    return m_connectionData;
}

bool ReportData::supportsConnections() const
{
    return false;
}

QList<ConnectionData> ReportData::connections(
    const IEditorItem* item) const
{
    QList<ConnectionData> ret;

    return ret;
}

void ReportData::clearData(const QList<IEditorItem* >& preserve)
{
    m_executions->clear();
    m_steps->clear();
    m_tokens->clear();
}

QList<ConnectionData> ReportData::connections() const
{
    QList<ConnectionData> ret;

    return ret;
}

QString ReportData::timeStamp() const
{
    return m_timeStamp;
}

const QStandardItemModel* ReportData::executions() const
{
    return m_executions;
}

const QStandardItemModel* ReportData::tokens() const
{
    return m_tokens;
}

const QStandardItemModel* ReportData::steps() const
{
    return m_steps;
}

void ReportData::setTimeStamp(const QString& ts)
{
    m_timeStamp = ts;
}

void ReportData::setExecutions(QStandardItemModel* model)
{
    m_executions = model;
}

void ReportData::setTokens(QStandardItemModel* model)
{
    m_tokens = model;
}

void ReportData::setSteps(QStandardItemModel* model)
{
    m_steps = model;
}
